# Maintainer: David Runge <dave@sleepmap.de>
pkgname=zita-rev1
pkgver=0.2.2
pkgrel=2
pkgdesc="A reworked jack version of the reverb originally developed for Aeolus."
arch=('loong64' 'x86_64')
url="https://kokkinizita.linuxaudio.org/linuxaudio/zita-rev1-doc/quickguide.html"
license=('GPL2')
groups=('pro-audio')
depends=('cairo' 'clxclient' 'clthreads' 'jack')
makedepends=('gendesk')
source=("https://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pkgname}-${pkgver}.tar.bz2")
sha512sums=('7ba145da6eb3163c84c8efac59c2bff3973d215caa1e4ffc9d6b9bf4eab50cc57133a439bde216724edbb0268366891bc2ddb1950c46804debde7404ce171279')

prepare() {
  cd "${pkgname}-${pkgver}"
  # strip march=native
  sed -e '/native/d' \
      -i source/Makefile
  # XDG desktop files
  gendesk -n \
          --pkgname ${pkgname} \
          --pkgdesc "${pkgdesc}" \
          --name zita-rev1 \
          --categories "AudioVideo;Audio"
}

build() {
  cd "${pkgname}-${pkgver}/source"
  make PREFIX=/usr
}

package() {
  cd "${pkgname}-${pkgver}/source"
  make DESTDIR="${pkgdir}/" PREFIX=/usr install
  # XDG desktop integration
  install -vDm 644 "../${pkgname}.desktop" \
    -t "${pkgdir}/usr/share/applications/"
  # docs
  install -t "${pkgdir}/usr/share/doc/$pkgname" \
    -vDm 644 ../{AUTHORS,README,doc/*}
}
# vim:set ts=2 sw=2 et:
